package com.sphd.restaurantsystem.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.restaurantsystem.R;
import com.sphd.restaurantsystem.info.GreensInfo;
import com.sphd.restaurantsystem.utils.Constant;
import com.wzh.frame.utils.BigDisMailUtils;

import java.util.List;

/**
 * Created by Hu on 2016/12/5.
 */

public class SureOrdersAdapter extends BaseQuickAdapter<GreensInfo> {

    public SureOrdersAdapter(int layoutResId, List<GreensInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, GreensInfo greensInfo) {
            baseViewHolder
                    .setText(R.id.greens_name,greensInfo.getDishes_name())
                    .setText(R.id.greens_no,"x"+greensInfo.getBuyNo())
                    .setText(R.id.greens_money, BigDisMailUtils.turnTrim(greensInfo.getDishes_price(), Constant.DECIMAL_POINT_TWO))
                    .setText(R.id.greens_vip, BigDisMailUtils.turnTrim(greensInfo.getDishes_vipprice(), Constant.DECIMAL_POINT_TWO));
    }
}
